<?php namespace system\database\migrations;
use houdunwang\database\build\Migration;
use houdunwang\database\build\Blueprint;
use houdunwang\database\Schema;
class CreateCategoryTable extends Migration {
	//执行
	public function up() {
		Schema::create( 'category', function ( Blueprint $table ) {
			$table->increments( 'cate_cid' );
			$table->timestamps();
			$table->string('cate_name', 100)->defaults('')->comment('栏目名称');
			$table->string('cate_description', 200)->defaults('')->comment('栏目描述');
			$table->tinyInteger('cate_sort')->defaults(0)->comment('栏目排序');
			$table->string('cate_linkurl')->defaults(0)->comment('栏目父级ID');
		});
	}

	//回滚
	public function down() {
		Schema::drop( 'category' );
	}
}